package creational.singleton;

/**
 * @desc 静态内部类写法
 */
public class Singleton5 {
    private static class Holder {
        private static Singleton5 singleton = new Singleton5();
    }

    private Singleton5(){}

    public static Singleton5 getSingleton(){
        return Holder.singleton;
    }
}
